<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.3" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/favicon.ico?v=5.1.3">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon.ico?v=5.1.3">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon.ico?v=5.1.3">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.3" color="#222">





  <meta name="keywords" content="SS,centos,搭建,服务器," />










<meta name="description" content="一.概要一个帮你绕过防火墙的迅速的隧道代理.特性:  TCP &amp;amp; UDP support User management API TCP fast open Workers and graceful restart Destination IP blacklist  二.服务端I安装Debian / Ubuntu:12apt-get install python-pippip instal">
<meta name="keywords" content="SS,centos,搭建,服务器">
<meta property="og:type" content="article">
<meta property="og:title" content="Shadowsocks服务器端的搭建(请善用返回功能)">
<meta property="og:url" content="http://hexo.mantoujun.top/2017/04/26/Shadowsocks服务器端的搭建/index.html">
<meta property="og:site_name" content="未知领域">
<meta property="og:description" content="一.概要一个帮你绕过防火墙的迅速的隧道代理.特性:  TCP &amp;amp; UDP support User management API TCP fast open Workers and graceful restart Destination IP blacklist  二.服务端I安装Debian / Ubuntu:12apt-get install python-pippip instal">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="http://hexo.mantoujun.top/2017/04/26/Shadowsocks服务器端的搭建/Shadowsocks_Server_on_Windows.png">
<meta property="og:updated_time" content="2017-04-30T10:11:01.330Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Shadowsocks服务器端的搭建(请善用返回功能)">
<meta name="twitter:description" content="一.概要一个帮你绕过防火墙的迅速的隧道代理.特性:  TCP &amp;amp; UDP support User management API TCP fast open Workers and graceful restart Destination IP blacklist  二.服务端I安装Debian / Ubuntu:12apt-get install python-pippip instal">
<meta name="twitter:image" content="http://hexo.mantoujun.top/2017/04/26/Shadowsocks服务器端的搭建/Shadowsocks_Server_on_Windows.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '5.1.3',
    sidebar: {"position":"left","display":"always","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://hexo.mantoujun.top/2017/04/26/Shadowsocks服务器端的搭建/"/>





  <title>Shadowsocks服务器端的搭建(请善用返回功能) | 未知领域</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">未知领域</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">女装是最吼的</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://hexo.mantoujun.top/2017/04/26/Shadowsocks服务器端的搭建/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="pancc">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/uploads/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="未知领域">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Shadowsocks服务器端的搭建(请善用返回功能)</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-04-26T21:59:00+08:00">
                2017-04-26
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/服务器/" itemprop="url" rel="index">
                    <span itemprop="name">服务器</span>
                  </a>
                </span>

                
                
                  ， 
                
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/服务器/SS/" itemprop="url" rel="index">
                    <span itemprop="name">SS</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="一-概要"><a href="#一-概要" class="headerlink" title="一.概要"></a>一.概要</h1><p>一个帮你绕过防火墙的迅速的隧道代理.<br>特性:</p>
<ul>
<li>TCP &amp; UDP support</li>
<li>User management API</li>
<li>TCP fast open</li>
<li>Workers and graceful restart</li>
<li>Destination IP blacklist</li>
</ul>
<h1 id="二-服务端"><a href="#二-服务端" class="headerlink" title="二.服务端"></a>二.服务端</h1><h2 id="I安装"><a href="#I安装" class="headerlink" title="I安装"></a>I安装</h2><h3 id="Debian-Ubuntu"><a href="#Debian-Ubuntu" class="headerlink" title="Debian / Ubuntu:"></a>Debian / Ubuntu:</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">apt-get install python-pip</span><br><span class="line">pip install shadowsocks</span><br></pre></td></tr></table></figure>
<h3 id="CentOS"><a href="#CentOS" class="headerlink" title="CentOS:"></a>CentOS:</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">yum install python-setuptools &amp;&amp; easy_install pip</span><br><span class="line">pip install shadowsocks</span><br><span class="line">enter code here</span><br></pre></td></tr></table></figure>
<h3 id="Windows"><a href="#Windows" class="headerlink" title="Windows:"></a>Windows:</h3><p>不推荐部署在Windows上，因为在Windows上的<code>select</code>API非常有限。如果你想要为多个用户提供服务，请选择部署在LINUX上</p>
<p> 1.下载并安装l <a href="https://www.python.org/downloads/windows/" target="_blank" rel="noopener">Python for Windows</a>, 在64位Windows操作系统中可以选择 x86-64 MSI 安装包 .<br> 2.在这个过程中你需要安装 <code>pip</code><br><img src="/2017/04/26/Shadowsocks服务器端的搭建/Shadowsocks_Server_on_Windows.png" alt="Shadowsocks_Server_on_Windows.png"></p>
<ol>
<li>安装 <a href="https://slproweb.com/products/Win32OpenSSL.html" target="_blank" rel="noopener">OpenSSL for Windows</a>. 如果你安装了 <strong>64</strong>位 Python, 你应该选择<strong>64</strong>位 OpenSSL.</li>
<li><p>如在 Linux上安装,在命令提示符下,输入命令行</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pip install shadowsocks</span><br></pre></td></tr></table></figure>
<p>5.如果你想用 <code>salsa20</code> or <code>chacha20</code> 加密, 下载 <a href="http://download.libsodium.org/libsodium/releases/" target="_blank" rel="noopener">libsodium</a> 并将所有dll文件(不需要路径)放进  <code>C:\Windows\System32</code> or <code>C:\Windows\SysWOW64 (32bit Python on 64bit Windows)</code>.</p>
</li>
</ol>
<h2 id="II使用"><a href="#II使用" class="headerlink" title="II使用"></a>II使用</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ssserver -p 443 -k password -m aes-256-cfb</span><br></pre></td></tr></table></figure>
<h3 id="后台运行"><a href="#后台运行" class="headerlink" title="后台运行:"></a>后台运行:</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start</span><br></pre></td></tr></table></figure>
<h3 id="停止"><a href="#停止" class="headerlink" title="停止:"></a>停止:</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo ssserver -d stop</span><br></pre></td></tr></table></figure>
<h3 id="检查日志"><a href="#检查日志" class="headerlink" title="检查日志:"></a>检查日志:</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo less /var/log/shadowsocks.log</span><br></pre></td></tr></table></figure>
<h3 id="用-h-查看所有参数"><a href="#用-h-查看所有参数" class="headerlink" title="用 -h 查看所有参数"></a>用 <code>-h</code> 查看所有参数</h3><h2 id="II以配置文件使用-建议"><a href="#II以配置文件使用-建议" class="headerlink" title="II以配置文件使用(建议)"></a>II以配置文件使用(建议)</h2><h3 id="创造配置文件并运行"><a href="#创造配置文件并运行" class="headerlink" title="创造配置文件并运行"></a>创造配置文件并运行</h3><p><span id="config.json"></span></p>
<h4 id="创造配置文件-etc-shadowsocks-json"><a href="#创造配置文件-etc-shadowsocks-json" class="headerlink" title="创造配置文件 /etc/shadowsocks.json"></a>创造配置文件 /etc/shadowsocks.json</h4><ul>
<li><p>单用户模板</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">    &quot;server&quot;:&quot;my_server_ip&quot;,</span><br><span class="line">    &quot;server_port&quot;:8388,</span><br><span class="line">    &quot;local_address&quot;: &quot;127.0.0.1&quot;,</span><br><span class="line">    &quot;local_port&quot;:1080,</span><br><span class="line">    &quot;password&quot;:&quot;mypassword&quot;,</span><br><span class="line">    &quot;timeout&quot;:300,</span><br><span class="line">    &quot;method&quot;:&quot;aes-256-cfb&quot;,</span><br><span class="line">    &quot;fast_open&quot;: false</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
<li><p>多个用户模板</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">&quot;server&quot;:&quot;my_server_ip&quot;,</span><br><span class="line">&quot;port_password&quot;:&#123;</span><br><span class="line">     &quot;8381&quot;:&quot;password1&quot;,</span><br><span class="line">     &quot;8382&quot;:&quot;password2&quot;,</span><br><span class="line">     &quot;8383&quot;:&quot;password3&quot;,</span><br><span class="line">     &quot;8384&quot;:&quot;password4&quot;</span><br><span class="line">     &#125;,</span><br><span class="line">&quot;timeout&quot;:300</span><br><span class="line">&quot;method&quot;:&quot;aes-256-cfb&quot;,</span><br><span class="line">&quot;fast_open&quot;:false,</span><br><span class="line">&quot;workers&quot;:1</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
</ul>
<p><span id="return_from_Encryption"></span><br><span id="return_from_fast_open"></span><br>各个字段的解释:</p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Explanation</th>
</tr>
</thead>
<tbody>
<tr>
<td>server</td>
<td>监听的主机地址</td>
</tr>
<tr>
<td>server_port</td>
<td>服务端口</td>
</tr>
<tr>
<td>local_address</td>
<td>监听的本地地址</td>
</tr>
<tr>
<td>local_port</td>
<td>本地端口</td>
</tr>
<tr>
<td>password</td>
<td>密码(提供给加密)</td>
</tr>
<tr>
<td>timeout</td>
<td>超时</td>
</tr>
<tr>
<td>method</td>
<td>加密方式，预置: “aes-256-cfb”，见<a href="#Encryption">III加密格式</a></td>
</tr>
<tr>
<td>fast_open</td>
<td>使用<a href="#fast_open">TCP_FASTOPEN</a>, true /false</td>
</tr>
<tr>
<td>workers</td>
<td>number of workers, available on Unix/Linux</td>
</tr>
</tbody>
</table>
<h4 id="前台运行"><a href="#前台运行" class="headerlink" title="前台运行"></a>前台运行</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ssserver -c /etc/shadowsocks.json</span><br></pre></td></tr></table></figure>
<h4 id="后台运行-1"><a href="#后台运行-1" class="headerlink" title="后台运行"></a>后台运行</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">ssserver -c /etc/shadowsocks.json -d start //启动服务</span><br><span class="line">ssserver -c /etc/shadowsocks.json -d stop  //关闭服务</span><br></pre></td></tr></table></figure>
<h3 id="开始服务"><a href="#开始服务" class="headerlink" title="开始服务:"></a>开始服务:</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ssserver -c /etc/shadowsocks.json //前台运行</span><br></pre></td></tr></table></figure>
<p><span id="Encryption"></span></p>
<h2 id="III加密格式"><a href="#III加密格式" class="headerlink" title="III加密格式"></a>III加密格式</h2><p>支持的密码类</p>
<table>
<thead>
<tr>
<th></th>
<th>Python</th>
<th>libev</th>
<th>Go</th>
<th>Qt</th>
</tr>
</thead>
<tbody>
<tr>
<td>SSL library (AES, etc)</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
</tr>
<tr>
<td>RC4-MD5</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
</tr>
<tr>
<td>Salsa20, Chacha20</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
</tr>
</tbody>
</table>
<h3 id="M2Crypto"><a href="#M2Crypto" class="headerlink" title="M2Crypto"></a>M2Crypto</h3><p>使用<code>M2Crypto</code>会稍微加快加密过程<br>Debian:<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">apt-get install python-m2crypto</span><br></pre></td></tr></table></figure></p>
<p>CentOS:<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">yum install m2crypto</span><br></pre></td></tr></table></figure></p>
<h3 id="rc4-md5"><a href="#rc4-md5" class="headerlink" title="rc4-md5"></a>rc4-md5</h3><p><code>rc4-md5</code> 是安全，快速的使用不同的值链接加密方式. 推荐在 OpenWRT路由器上使用.</p>
<h3 id="salsa20-and-chacha20"><a href="#salsa20-and-chacha20" class="headerlink" title="salsa20 and chacha20"></a>salsa20 and chacha20</h3><p><code>salsa20</code> and <code>chacha20</code> 同是快速的序列密码. 在x86_64系统上最优部署的<code>salsa20</code> 甚至能获得比<code>r4</code>快两倍的速度 (尽管ARM运行较慢).<br>安装 <a href="https://github.com/jedisct1/libsodium" target="_blank" rel="noopener">libsodium</a> &gt;= 1.0.0 如果你想要使用它们.<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install build-essential</span><br><span class="line">wget https://github.com/jedisct1/libsodium/releases/download/1.0.8/libsodium-1.0.8.tar.gz</span><br><span class="line">tar xf libsodium-1.0.8.tar.gz &amp;&amp; cd libsodium-1.0.8</span><br><span class="line">./configure &amp;&amp; make -j2</span><br><span class="line">sudo make install</span><br><span class="line">sudo ldconfig</span><br></pre></td></tr></table></figure></p>
<p><a href="#return_from_Encryption">返回字段的解释处</a></p>
<h3 id="弃用的密码"><a href="#弃用的密码" class="headerlink" title="弃用的密码"></a>弃用的密码</h3><p>这些旧的密码是慢的或者不安全的，不要使用它们:</p>
<ul>
<li>rc4</li>
<li>des-cfb</li>
<li>table</li>
<li>salsa20-ctr</li>
</ul>
<h2 id="IV其他"><a href="#IV其他" class="headerlink" title="IV其他"></a>IV其他</h2><p><span id="fast_open"></span><br><span id="return_from_Optimizing_Shadowsocks"></span><br><span id="return_from_Feature_Comparison_across_Different_Versions"></span></p>
<h3 id="fast-open"><a href="#fast-open" class="headerlink" title="fast_open"></a>fast_open</h3><p>如果你的伺服器和客户程序都部署在 Linux 3.7.1 或者更高版本,你可以打开 fast_open 以获得更低延迟.</p>
<p>首先你在的配置文件 <a href="#config.json">config.json</a>将设置<code>fast_open</code>为 <code>true</code></p>
<p>然后在你的OS上暂时打开<code>fast open</code>：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">echo 3 &gt; /proc/sys/net/ipv4/tcp_fastopen</span><br></pre></td></tr></table></figure></p>
<p>要永久打开<code>fast open</code>, 见 <a href="#Optimizing_Shadowsocks">Optimizing Shadowsocks</a>.<br>注意: 只有一些<a href="#Feature_Comparison_across_Different_Versions">版本</a>支持这个特性.</p>
<p><a href="#return_from_fast_open">返回字段解释处</a></p>
<p><span id="Feature_Comparison_across_Different_Versions"></span></p>
<h3 id="Here’s-the-page-answering-questions-does-A-support-B"><a href="#Here’s-the-page-answering-questions-does-A-support-B" class="headerlink" title="Here’s the page answering questions: does A support B?"></a>Here’s the page answering questions: does A support B?</h3><h4 id="Servers"><a href="#Servers" class="headerlink" title="Servers"></a>Servers</h4><table>
<thead>
<tr>
<th></th>
<th><a href="https://github.com/shadowsocks/shadowsocks" target="_blank" rel="noopener">Python</a></th>
<th><a href="https://github.com/shadowsocks/shadowsocks-libev" target="_blank" rel="noopener">libev</a></th>
<th><a href="https://github.com/shadowsocks/shadowsocks-go" target="_blank" rel="noopener">Go</a></th>
</tr>
</thead>
<tbody>
<tr>
<td>Fast Open</td>
<td>Y</td>
<td>Y</td>
<td>N</td>
</tr>
<tr>
<td>Multiple Users</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
</tr>
<tr>
<td>Management API</td>
<td>Y</td>
<td>Y</td>
<td>N</td>
</tr>
<tr>
<td>Workers</td>
<td>Y</td>
<td>N</td>
<td>N</td>
</tr>
<tr>
<td>Graceful Restart</td>
<td>Y</td>
<td>N</td>
<td>N</td>
</tr>
<tr>
<td>ss-redir</td>
<td>N</td>
<td>Y</td>
<td>N</td>
</tr>
<tr>
<td>ss-tunnel</td>
<td>N</td>
<td>Y</td>
<td>N</td>
</tr>
<tr>
<td>UDP Relay</td>
<td>Y</td>
<td>Y</td>
<td>N</td>
</tr>
<tr>
<td>OTA</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
</tr>
</tbody>
</table>
<h4 id="Clients"><a href="#Clients" class="headerlink" title="Clients"></a>Clients</h4><table>
<thead>
<tr>
<th></th>
<th><a href="https://github.com/shadowsocks/shadowsocks-csharp" target="_blank" rel="noopener">Windows</a></th>
<th><a href="https://github.com/shadowsocks/shadowsocks-iOS" target="_blank" rel="noopener">ShadowsocksX</a></th>
<th><a href="https://github.com/shadowsocks/shadowsocks-qt5" target="_blank" rel="noopener">Qt5</a></th>
<th><a href="https://github.com/shadowsocks/shadowsocks-android" target="_blank" rel="noopener">Android</a></th>
<th><a href="https://github.com/shadowsocks/shadowsocks-iOS" target="_blank" rel="noopener">iOS App Store</a></th>
<th><a href="https://github.com/linusyang/MobileShadowSocks" target="_blank" rel="noopener">iOS Cydia</a></th>
</tr>
</thead>
<tbody>
<tr>
<td>System Proxy</td>
<td>Y</td>
<td>Y</td>
<td>N</td>
<td>Y</td>
<td>N</td>
<td>Y</td>
</tr>
<tr>
<td>CHNRoutes</td>
<td>Y</td>
<td>Y</td>
<td>N</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
</tr>
<tr>
<td>PAC Configuration</td>
<td>Y</td>
<td>Y</td>
<td>N</td>
<td>N</td>
<td>N</td>
<td>N</td>
</tr>
<tr>
<td>Profile Switching</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>N</td>
<td>Y</td>
</tr>
<tr>
<td>QR Code Scan</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
</tr>
<tr>
<td>QR Code Generation</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>Y</td>
<td>N</td>
<td>Y</td>
</tr>
</tbody>
</table>
<p><a href="#return_from_Feature_Comparison_across_Different_Versions">返回fast_open处 </a></p>
<p><span id="Optimizing_Shadowsocks"></span></p>
<h3 id="Optimizing-Shadowsocks"><a href="#Optimizing-Shadowsocks" class="headerlink" title="Optimizing Shadowsocks"></a>Optimizing Shadowsocks</h3><p>如果你在日志中看到大量<code>error: too many open files</code>, 你应该优化你的系统. 这个引导应用到所有shadowsocks 服务器 (Python, libev, etc).</p>
<h4 id="在-Debian-7"><a href="#在-Debian-7" class="headerlink" title="在 Debian 7"></a>在 Debian 7</h4><p>新建 <code>/etc/sysctl.d/local.conf</code> 并包含以下内容:<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br></pre></td><td class="code"><pre><span class="line"># max open files</span><br><span class="line">fs.file-max = 51200</span><br><span class="line"># max read buffer</span><br><span class="line">net.core.rmem_max = 67108864</span><br><span class="line"># max write buffer</span><br><span class="line">net.core.wmem_max = 67108864</span><br><span class="line"># default read buffer</span><br><span class="line">net.core.rmem_default = 65536</span><br><span class="line"># default write buffer</span><br><span class="line">net.core.wmem_default = 65536</span><br><span class="line"># max processor input queue</span><br><span class="line">net.core.netdev_max_backlog = 4096</span><br><span class="line"># max backlog</span><br><span class="line">net.core.somaxconn = 4096</span><br><span class="line"></span><br><span class="line"># resist SYN flood attacks</span><br><span class="line">net.ipv4.tcp_syncookies = 1</span><br><span class="line"># reuse timewait sockets when safe</span><br><span class="line">net.ipv4.tcp_tw_reuse = 1</span><br><span class="line"># turn off fast timewait sockets recycling</span><br><span class="line">net.ipv4.tcp_tw_recycle = 0</span><br><span class="line"># short FIN timeout</span><br><span class="line">net.ipv4.tcp_fin_timeout = 30</span><br><span class="line"># short keepalive time</span><br><span class="line">net.ipv4.tcp_keepalive_time = 1200</span><br><span class="line"># outbound port range</span><br><span class="line">net.ipv4.ip_local_port_range = 10000 65000</span><br><span class="line"># max SYN backlog</span><br><span class="line">net.ipv4.tcp_max_syn_backlog = 4096</span><br><span class="line"># max timewait sockets held by system simultaneously</span><br><span class="line">net.ipv4.tcp_max_tw_buckets = 5000</span><br><span class="line"># turn on TCP Fast Open on both client and server side</span><br><span class="line">net.ipv4.tcp_fastopen = 3</span><br><span class="line"># TCP receive buffer</span><br><span class="line">net.ipv4.tcp_rmem = 4096 87380 67108864</span><br><span class="line"># TCP write buffer</span><br><span class="line">net.ipv4.tcp_wmem = 4096 65536 67108864</span><br><span class="line"># turn on path MTU discovery</span><br><span class="line">net.ipv4.tcp_mtu_probing = 1</span><br><span class="line"></span><br><span class="line"># for high-latency network</span><br><span class="line">net.ipv4.tcp_congestion_control = hybla</span><br><span class="line"></span><br><span class="line"># for low-latency network, use cubic instead</span><br><span class="line"># net.ipv4.tcp_congestion_control = cubic</span><br></pre></td></tr></table></figure></p>
<p>然后<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sysctl --system</span><br></pre></td></tr></table></figure></p>
<p>对于旧的操作系统：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sysctl -p /etc/sysctl.d/local.conf</span><br></pre></td></tr></table></figure></p>
<p><span id="return_from_Configure_Shadowsocks_with_Supervisor"><span><br>注意: <strong>不要启用</strong> <code>net.ipv4.tcp_tw_recycle</code>!!! 见 <a href="http://vincent.bernat.im/en/blog/2014-tcp-time-wait-state-linux.html" target="_blank" rel="noopener">这个文章</a>.<br>如果你使用<a href="#Configure_Shadowsocks_with_Supervisor">Supervisor</a>,确保你在<code>/etc/default/supervisor</code>有如下行  . 一旦你添加了这一行, 重启 Supervisor (<code>service stop supervisor &amp;&amp;  service start supervisor</code>).</span></span></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ulimit -n 51200</span><br></pre></td></tr></table></figure>
<p>如果你用其他方式在后台运行 shadowsocks , 确保你在init 脚本添加了 <code>ulimit -n 51200</code> .<br>优化后，一个执行千计连接的繁忙的Shadowsocks服务器 占用大概30MB 内存 和 10% CPU. 请注意在同样的情况下<strong>Linux kernel 经常使用 &gt;100MB RAM</strong> 去处理 buffer 和 cache. 在使用了上述的 sysct 设置, 你用RAM换取了速度. 如果你想要使用更少的RAM，减少 rmem 和 wmem 的大小.</p>
<p><a href="#return_from_Optimizing_Shadowsocks">返回 fast_open 处</a></p>
<p><span id="Configure_Shadowsocks_with_Supervisor"></span></p>
<h3 id="Supervisor-运行-Shadowsocks"><a href="#Supervisor-运行-Shadowsocks" class="headerlink" title="Supervisor 运行 Shadowsocks"></a>Supervisor 运行 Shadowsocks</h3><p>说明： 从 Shadowsocks 2.6 开始，你可以直接在后台运行 Shadowsocks，无需 Supervisor 。 这样省掉了 Supervisor 进程占用的内存。</p>
<figure class="highlight stylus"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">ssserver -c /etc/shadowsocks<span class="selector-class">.json</span> -d start</span><br><span class="line">ssserver -c /etc/shadowsocks<span class="selector-class">.json</span> -d stop</span><br></pre></td></tr></table></figure>
<p>对于老版本：</p>
<p>编辑 <code>/etc/shadowsocks.json</code></p>
<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">    <span class="attr">"server"</span>:<span class="string">"0.0.0.0"</span>,</span><br><span class="line">    <span class="attr">"server_port"</span>:<span class="number">7325</span>,</span><br><span class="line">    <span class="attr">"local_port"</span>:<span class="number">1080</span>,</span><br><span class="line">    <span class="attr">"password"</span>:<span class="string">"my password"</span>,</span><br><span class="line">    <span class="attr">"timeout"</span>:<span class="number">600</span>,</span><br><span class="line">    <span class="attr">"method"</span>:<span class="string">"aes-256-cfb"</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>记得改密码和服务端端口，不要用默认的。</p>
<p>执行</p>
<figure class="highlight vim"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">apt-<span class="built_in">get</span> <span class="keyword">update</span></span><br><span class="line">apt-<span class="built_in">get</span> install <span class="keyword">python</span>-pip <span class="keyword">python</span>-m2crypto supervisor</span><br><span class="line">pip install shadowsocks</span><br></pre></td></tr></table></figure>
<p>编辑 <code>/etc/supervisor/conf.d/shadowsocks.conf</code></p>
<figure class="highlight ini"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="section">[program:shadowsocks]</span></span><br><span class="line"><span class="attr">command</span>=ssserver -c /etc/shadowsocks.json</span><br><span class="line"><span class="attr">autorestart</span>=<span class="literal">true</span></span><br><span class="line"><span class="attr">user</span>=nobody</span><br></pre></td></tr></table></figure>
<p>如果端口 &lt; 1024，把上面的 user=nobody 改成 user=root。</p>
<p>在 <code>/etc/default/supervisor</code> 最后加一行：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ulimit -n 51200</span><br></pre></td></tr></table></figure>
<p>执行</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">service supervisor start</span><br><span class="line">supervisorctl reload</span><br></pre></td></tr></table></figure>
<p>如果遇到问题，可以检查日志：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">supervisorctl tail -f shadowsocks stderr</span><br></pre></td></tr></table></figure>
<p>如果修改了 shadowsocks 配置 <code>/etc/shadowsocks.json</code>， 可以重启 shadowsocks：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">supervisorctl restart shadowsocks</span><br></pre></td></tr></table></figure>
<p>如果修改了 Supervisor 的配置文件 <code>/etc/supervisor/</code>*， 可以更新 supervisor 配置：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">supervisorctl update</span><br></pre></td></tr></table></figure>
<p><a href="#return_from_Configure_Shadowsocks_with_Supervisor">返回Optimizing Shadowsocks处</a></p>
<h2 id="V文档"><a href="#V文档" class="headerlink" title="V文档"></a>V文档</h2><p>你可以在 <a href="https://github.com/shadowsocks/shadowsocks/wiki" target="_blank" rel="noopener">Wiki</a>.上找到所有原版文档</p>
<h2 id="VI开源许可证"><a href="#VI开源许可证" class="headerlink" title="VI开源许可证"></a>VI开源许可证</h2><p>Copyright 2015 clowwindy<br>Licensed under the <a href="https://choosealicense.com/licenses/apache-2.0/" target="_blank" rel="noopener">Apache License</a>; you may not use this file except in compliance with the License. You may obtain a copy of the License at<br>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.</p>
<h2 id="VII后记"><a href="#VII后记" class="headerlink" title="VII后记"></a>VII后记</h2><p>在腾讯云上搭建的时候遇到了端口初始化失败的问题，后来发现<code>&quot;server&quot;</code>这一行填写的必须是内网 IP. </p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/SS/" rel="tag"># SS</a>
          
            <a href="/tags/centos/" rel="tag"># centos</a>
          
            <a href="/tags/搭建/" rel="tag"># 搭建</a>
          
            <a href="/tags/服务器/" rel="tag"># 服务器</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/04/25/利用 git-backup 插件备份hexo数据/" rel="next" title="利用 git-backup 插件备份hexo数据">
                <i class="fa fa-chevron-left"></i> 利用 git-backup 插件备份hexo数据
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/04/28/dnsmasq-conf(英文原版)/" rel="prev" title="dnsmasq-conf(英文原版)">
                dnsmasq-conf(英文原版) <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/uploads/avatar.jpg"
                alt="pancc" />
            
              <p class="site-author-name" itemprop="name">pancc</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">28</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">28</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">26</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          <div class="links-of-author motion-element">
            
          </div>

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#一-概要"><span class="nav-number">1.</span> <span class="nav-text">一.概要</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#二-服务端"><span class="nav-number">2.</span> <span class="nav-text">二.服务端</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#I安装"><span class="nav-number">2.1.</span> <span class="nav-text">I安装</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#Debian-Ubuntu"><span class="nav-number">2.1.1.</span> <span class="nav-text">Debian / Ubuntu:</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#CentOS"><span class="nav-number">2.1.2.</span> <span class="nav-text">CentOS:</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Windows"><span class="nav-number">2.1.3.</span> <span class="nav-text">Windows:</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#II使用"><span class="nav-number">2.2.</span> <span class="nav-text">II使用</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#后台运行"><span class="nav-number">2.2.1.</span> <span class="nav-text">后台运行:</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#停止"><span class="nav-number">2.2.2.</span> <span class="nav-text">停止:</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#检查日志"><span class="nav-number">2.2.3.</span> <span class="nav-text">检查日志:</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#用-h-查看所有参数"><span class="nav-number">2.2.4.</span> <span class="nav-text">用 -h 查看所有参数</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#II以配置文件使用-建议"><span class="nav-number">2.3.</span> <span class="nav-text">II以配置文件使用(建议)</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#创造配置文件并运行"><span class="nav-number">2.3.1.</span> <span class="nav-text">创造配置文件并运行</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#创造配置文件-etc-shadowsocks-json"><span class="nav-number">2.3.1.1.</span> <span class="nav-text">创造配置文件 /etc/shadowsocks.json</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#前台运行"><span class="nav-number">2.3.1.2.</span> <span class="nav-text">前台运行</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#后台运行-1"><span class="nav-number">2.3.1.3.</span> <span class="nav-text">后台运行</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#开始服务"><span class="nav-number">2.3.2.</span> <span class="nav-text">开始服务:</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#III加密格式"><span class="nav-number">2.4.</span> <span class="nav-text">III加密格式</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#M2Crypto"><span class="nav-number">2.4.1.</span> <span class="nav-text">M2Crypto</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#rc4-md5"><span class="nav-number">2.4.2.</span> <span class="nav-text">rc4-md5</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#salsa20-and-chacha20"><span class="nav-number">2.4.3.</span> <span class="nav-text">salsa20 and chacha20</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#弃用的密码"><span class="nav-number">2.4.4.</span> <span class="nav-text">弃用的密码</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#IV其他"><span class="nav-number">2.5.</span> <span class="nav-text">IV其他</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#fast-open"><span class="nav-number">2.5.1.</span> <span class="nav-text">fast_open</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Here’s-the-page-answering-questions-does-A-support-B"><span class="nav-number">2.5.2.</span> <span class="nav-text">Here’s the page answering questions: does A support B?</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#Servers"><span class="nav-number">2.5.2.1.</span> <span class="nav-text">Servers</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Clients"><span class="nav-number">2.5.2.2.</span> <span class="nav-text">Clients</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Optimizing-Shadowsocks"><span class="nav-number">2.5.3.</span> <span class="nav-text">Optimizing Shadowsocks</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#在-Debian-7"><span class="nav-number">2.5.3.1.</span> <span class="nav-text">在 Debian 7</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Supervisor-运行-Shadowsocks"><span class="nav-number">2.5.4.</span> <span class="nav-text">Supervisor 运行 Shadowsocks</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#V文档"><span class="nav-number">2.6.</span> <span class="nav-text">V文档</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#VI开源许可证"><span class="nav-number">2.7.</span> <span class="nav-text">VI开源许可证</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#VII后记"><span class="nav-number">2.8.</span> <span class="nav-text">VII后记</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2015 &mdash; <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">pancc</span>

  
</div>









        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  




  
  









  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  

  
  
    <script type="text/javascript" src="/lib/three/three.min.js"></script>
  

  
  
    <script type="text/javascript" src="/lib/three/three-waves.min.js"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.3"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.3"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.3"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.3"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.3"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.3"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.3"></script>



  


  




	





  





  









<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="//unpkg.com/valine/dist/Valine.min.js"></script>



  





  

  

  

  
  

  

  

  

</body>
</html>
